package com.zhz.mall.portal.modules.oms.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.zhz.mall.portal.dto.OrderDetailDTO;
import com.zhz.mall.portal.dto.OrderListDTO;
import com.zhz.mall.portal.modules.oms.model.OmsOrder;
import org.apache.ibatis.annotations.Param;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author zhouhengzhe
 * @since 2023-02-04
 */
public interface OmsOrderMapper extends BaseMapper<OmsOrder> {

    /**
     * 读取下单成功后的订单详情
     *
     * @param orderId
     * @return
     */
    OrderDetailDTO getOrderDetail(Long orderId);

    /**
     * 我的订单列表
     *
     * @param page
     * @param memberId
     * @return
     */
    IPage<OrderListDTO> getMyOrders(Page<OmsOrder> page, @Param("memberId") Long memberId);

}
